package javalearning.MultiThreads.yiekd;

import java.util.Date;

public class ThreadYield extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(getName() + "--" + i + ", 日期： " + new Date());
            // 睡眠
            Thread.yield();
        }
    }
}
